home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 19
/
Mac Magazin and MacEasy Magazine CD - Issue 19.iso
/
Grafik & Text & Film
/
Quark XTensions
/
Freeware Xtensions
/
XPress Scripts 1.0
/
Set Guides
/
Set Guides
next >
Wrap
Text File
|
1994-08-10
|
2KB
|
64 lines
tell application "QuarkXPress 3.3"
activate
if document 1 exists then
tell current page of document 1
copy (display dialog "Set guides:" default answer "" buttons {"Cancel", "Horizontal", "Vertical"} with icon 2000) to x
do updates
try
if button returned of x is "Horizontal" then
copy text returned of x to y
copy every character of y as list to y
repeat with i from 1 to count of items in y
if item i of y = "," then
set item i of y to " "
end if
end repeat
copy y as text to y
if y = "" then
beep
display dialog "No guide drawn. (No value entered)" buttons "Okay" default button 1 with icon 1
do updates
else
repeat with i from 1 to count of words in y
copy word i of y to guidePosition
make horizontal guide at beginning with properties {position:guidePosition}
end repeat
end if
else if button returned of x is "Vertical" then
copy text returned of x to y
copy every character of y as list to y
repeat with i from 1 to count of items in y
if item i of y = "," then
set item i of y to " "
end if
end repeat
copy y as text to y
if y = "" then
beep
display dialog "No guide drawn." & return & "(No value entered)" buttons " Okay " default button 1 with icon 1
do updates
else
repeat with i from 1 to count of words in y
copy word i of y to guidePosition
make vertical guide at beginning with properties {position:guidePosition}
end repeat
end if
end if
on error errMsg
beep
display dialog "Invalid entry. ‘" & y & "’ cannot be used." buttons {" Okay "} default button 1 with icon 2
do updates
end try
end tell
else
beep
display dialog "This script requires an" & return & "open QuarkXPress document." buttons "OK" default button 1 with icon 1
do updates
end if
end tell